<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('project/index')}">项目列表</a></li>
			<li><a href="{:url('project/add')}">项目添加</a></li>
		</ul>
        <form class="well form-inline margin-top-20" method="get" action="{:url('project/index')}">
            门店:
            <select class="form-control" name="store_id">
            	<option value=""></option>
            	<foreach name="store_list" item="vo">
            		<option value="{$vo.id}" <if $vo.id == input('store_id')>selected</if> >{$vo.name}</option>
            	</foreach>
            </select>
            产品名称:
            <input type="text" class="form-control" name="title" style="width: 220px;" value="{:input('request.title/s','')}">
            类型:
            <select class="form-control" name="type_id">
            	<option value=""></option>
            	<foreach name="type_list" item="vo">
            		<option value="{$vo.id}" <if $vo.id == input('type_id')>selected</if> >{$vo.title}</option>
            	</foreach>
            </select>
            状态:
            <select class="form-control" name="status">
            	<option value=""></option>
            	<option value="1" <if 1 == input('status') && input('status') != ''>selected</if> >上架</option>
            	<option value="0" <if 0 == input('status') && input('status') != ''>selected</if> >下架</option>
            </select>
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('project/index')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th width="200">产品名称</th>
					<th>归属门店</th>
					<th>产品类型</th>
					<th>产品价格</th>
					<th>状态</th>
					<th>更新时间</th>
					<th>剩余合伙人</th>
					<th>是否删除</th>
					<th width="240">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.title}</td>
					<td>{$vo.store.name}</td>
					<td>{$vo.type.title}</td>
					<td>{$vo.price}</td>
					<td>{$vo.status_text}</td>
					<td>{$vo.update_time}</td>
					<td>{$vo.partner_num}</td>
					<td>
						<if $vo.delete_time>是<else/>否</if>
					</td>
					<td>
						<a class="btn btn-xs btn-primary" href='{:url("project/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
						<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('project/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>